package a.j;

import a.c.v;
import a.d.t;
import a.e.c;

import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class xb
  extends tb
{
  private boolean H;
  public static boolean I;
  
  public xb()
  {
    this.H = false;
  }
  
  public xb(tb paramtb)
  {
    super(paramtb);
    if (!bool)
    {
      if ((paramtb instanceof xb))
      {
        if (bool) {
          break label43;
        }
        this.H = ((xb)paramtb).Z();
      }
    }
    else if (!ld.D) {
      return;
    }
    label43:
    this.H = false;
  }
  
  public tb b(tb paramtb)
  {
    xb localxb = new xb(paramtb);
    return localxb;
  }
  
  public void d(boolean paramBoolean)
  {
    if (paramBoolean != this.H)
    {
      this.H = paramBoolean;
      Q();
    }
  }
  
  public boolean Z()
  {
    return this.H;
  }
  
  public eb a(double paramDouble1, double paramDouble2, eb parameb, int paramInt)
  {
    eb localeb = new eb(this, paramDouble1, paramDouble2);
    a(localeb, parameb, paramInt);
    return localeb;
  }
  
  public void a(eb parameb1, eb parameb2, int paramInt)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (paramInt == 0)
      {
        if (!bool2)
        {
          if ((this.D.size() > 0) && (parameb2 == this.D.d()))
          {
            this.D.b(parameb1, this.D.g());
            if (bool2) {
              return;
            }
            if (!bool1) {
              break label167;
            }
          }
          this.D.b(parameb1, this.D.d(parameb2));
          if (bool2) {
            return;
          }
        }
        if (!bool1) {
          break label167;
        }
      }
      if (bool2) {}
    }
    else if (this.D.size() > 0)
    {
      if (parameb2 == this.D.a())
      {
        this.D.a(parameb1, this.D.f());
        if (bool2) {
          return;
        }
        if (!bool1) {
          break label167;
        }
      }
    }
    this.D.a(parameb1, this.D.d(parameb2));
    label167:
    Q();
  }
  
  public eb b(double paramDouble1, double paramDouble2)
  {
    int i = e(paramDouble1, paramDouble2);
    if (((ld.E) || (i > 0)) && (i <= this.D.size())) {
      return a(paramDouble1, paramDouble2, (eb)this.D.a(i - 1), 1);
    }
    return c(paramDouble1, paramDouble2);
  }
  
  public eb a(eb parameb)
  {
    this.D.remove(parameb);
    Q();
    return parameb;
  }
  
  public int e(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (i().g())
      {
        if (bool2) {
          break label54;
        }
        if (n() < 2) {
          return super.e(paramDouble1, paramDouble2);
        }
      }
      if (bool2) {
        break label62;
      }
    }
    if (R()) {
      label54:
      v();
    }
    label62:
    Point2D localPoint2D = x();
    double d1 = localPoint2D.getX();
    double d2 = localPoint2D.getY();
    int i = 1;
    v localv = this.D.f();
    do
    {
      if (localv == null) {
        break;
      }
      eb localeb = (eb)localv.c();
      d3 = localeb.b();
      d4 = localeb.c();
      if (bool1) {
        break label215;
      }
      if (Line2D.ptSegDistSq(d1, d2, d3, d4, paramDouble1, paramDouble2) < 25.0D) {
        return i;
      }
      d1 = d3;
      d2 = d4;
      localv = localv.a();
      i++;
    } while (!bool1);
    localPoint2D = y();
    double d3 = localPoint2D.getX();
    double d4 = localPoint2D.getY();
    if ((!bool2) && (Line2D.ptSegDistSq(d1, d2, d3, d4, paramDouble1, paramDouble2) < 25.0D)) {
      label215:
      return i;
    }
    return 0;
  }
  
  Rectangle2D.Float a(Rectangle2D.Float paramFloat)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (i().g())
      {
        if (bool2) {
          break label80;
        }
        if (n() < 2)
        {
          if (!bool2)
          {
            paramFloat = super.a(paramFloat);
            if (n() == 1)
            {
              localObject1 = this.D.l();
              paramFloat.add(((eb)localObject1).b(), ((eb)localObject1).c());
            }
          }
          return paramFloat;
        }
      }
    }
    label80:
    Object localObject1 = y();
    if (!bool2) {
      if (paramFloat != null)
      {
        if (bool2) {
          break label136;
        }
        paramFloat.setFrame(((Point2D)localObject1).getX(), ((Point2D)localObject1).getY(), 1.0D, 1.0D);
        if (!bool1) {
          break label137;
        }
      }
    }
    label136:
    paramFloat = new Rectangle2D.Float((float)((Point2D)localObject1).getX(), (float)((Point2D)localObject1).getY(), 1.0F, 1.0F);
    label137:
    Object localObject2 = this.D.f();
    if (localObject2 != null) {}
    while (bool2)
    {
      localObject3 = (eb)((v)localObject2).c();
      paramFloat.add(((eb)localObject3).b(), ((eb)localObject3).c());
      localObject2 = ((v)localObject2).a();
      if (!bool1) {
        break;
      }
    }
    localObject2 = k();
    Object localObject3 = l();
    ((zd)localObject2).a(paramFloat, h());
    ((zd)localObject3).a(paramFloat, g());
    double d1 = paramFloat.getX();
    double d2 = d1 + paramFloat.getWidth();
    double d3 = paramFloat.getY();
    double d4 = d3 + paramFloat.getHeight();
    int i = V() - 1;
    do
    {
      if (i < 0) {
        break;
      }
      ig localig = d(i);
      if ((!bool2) && (bool1)) {
        return paramFloat;
      }
      if (!bool2)
      {
        if ((localig.B()) && ((bool2) || ((localig.H().length() != 0) || ((bool2) || (localig.z() != null)))))
        {
          t localt = localig.c();
          d2 = Math.max(localt.d + localt.a, d2);
          d1 = Math.min(localt.d, d1);
          d4 = Math.max(localt.e + localt.b, d4);
          d3 = Math.min(localt.e, d3);
        }
        i--;
      }
    } while (!bool1);
    if (!bool2) {
      paramFloat.setFrame(d1, d3, d2 - d1, d4 - d3);
    }
    return paramFloat;
  }
  
  public boolean a(Rectangle2D paramRectangle2D, boolean paramBoolean)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (!R())
      {
        if (bool2) {
          break label53;
        }
        if (this.F != null)
        {
          if (bool2) {
            break label64;
          }
          if (!this.F.intersects(paramRectangle2D)) {
            return false;
          }
        }
      }
      label53:
      if (bool2) {
        break label123;
      }
    }
    if (this.D.size() > 0)
    {
      label64:
      localObject1 = this.D.f();
      do
      {
        if (localObject1 == null) {
          break;
        }
        localObject2 = (eb)((v)localObject1).c();
        if (!bool2)
        {
          if (paramRectangle2D.contains(((eb)localObject2).b(), ((eb)localObject2).c())) {
            return true;
          }
          localObject1 = ((v)localObject1).a();
        }
      } while (!bool1);
    }
    label123:
    Object localObject1 = y();
    if ((bool2) || (paramRectangle2D.contains((Point2D)localObject1))) {
      return true;
    }
    Object localObject2 = x();
    if (!bool2) {
      if (paramRectangle2D.contains((Point2D)localObject2)) {
        return true;
      }
    }
    if ((bool2) || (paramBoolean))
    {
      int i = V() - 1;
      do
      {
        if (i < 0) {
          break;
        }
        ig localig = d(i);
        if (!bool2)
        {
          if ((localig.B()) && ((bool2) || ((localig.H().length() != 0) || ((bool2) || (localig.z() != null)))))
          {
            t localt = localig.c();
            if (bool2) {
              continue;
            }
            if (paramRectangle2D.intersects(localt.d, localt.e, localt.a, localt.b)) {
              return true;
            }
          }
          i--;
        }
      } while (!bool1);
    }
    double d1 = ((Point2D)localObject2).getX();
    double d2 = ((Point2D)localObject2).getY();
    if ((bool2) || (this.D.size() > 0))
    {
      v localv = this.D.f();
      do
      {
        if (localv == null) {
          break;
        }
        eb localeb = (eb)localv.c();
        if (bool1) {
          break label408;
        }
        if (paramRectangle2D.intersectsLine(d1, d2, localeb.b(), localeb.c())) {
          return true;
        }
        d1 = localeb.b();
        d2 = localeb.c();
        localv = localv.a();
      } while (!bool1);
    }
    label408:
    return paramRectangle2D.intersectsLine(d1, d2, ((Point2D)localObject1).getX(), ((Point2D)localObject1).getY());
  }
  
  protected byte a(Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool = ld.E;
    int i = 0;
    if (!bool) {
      if (i().g())
      {
        if (!bool) {
          if (n() == 0)
          {
            ld localld = h();
            c(k().a(localld), k().b(localld) - 10.0D - localld.d());
            i = 1;
            if (bool) {
              break label102;
            }
            if (!ld.D) {
              break label101;
            }
          }
        }
        if (bool) {
          break label102;
        }
        if (n() == 1) {
          i = 1;
        }
      }
    }
    label101:
    label102:
    if (!bool) {
      if (i != 0) {
        return ye.b(this, this.E, paramPoint2D1, paramPoint2D2);
      }
    }
    if (!bool) {
      if (this.H) {
        return ye.c(this, this.E, paramPoint2D1, paramPoint2D2);
      }
    }
    return ye.a(this, this.E, paramPoint2D1, paramPoint2D2);
  }
  
  public void a(gb paramgb)
  {
    paramgb.b(S().getPathIterator(null));
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeByte(1);
    super.a(paramObjectOutputStream);
    paramObjectOutputStream.writeBoolean(this.H);
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {}
    switch (paramObjectInputStream.readByte())
    {
    case 0: 
      super.a(paramObjectInputStream);
      this.H = false;
      if (!bool2) {
        if (!bool1) {
          return;
        }
      }
    case 1: 
      super.a(paramObjectInputStream);
      this.H = paramObjectInputStream.readBoolean();
      if (!bool1) {
        return;
      }
      break;
    }
    throw new c();
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.xb

 * JD-Core Version:    0.7.0.1

 */